FROM centos:7.9.2009

MAINTAINER LQuan

ENV LANG=zh_CN.UTF-8 \
    LANGUAGE=zh_CN:zh \
    LC_ALL=zh_CN.UTF-8 \
	WORK_DIR=/jvx/local \
	JAVA_HOME=/jvx/local/java8 \
	CLASSPATH=$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar \
	PATH=$PATH:$JAVA_HOME/bin

copy ./ /jvx/hostFile

RUN yum update -y && \
	yum install -y kde-l10n-Chinese telnet && \
    yum reinstall -y glibc-common && \
	localedef -c -f UTF-8 -i zh_CN zh_CN.UTF-8 && \
	yum install -y vim*  && \
	yum install -y lsof  && \
	yum install -y wget  && \
    yum clean all && \
    rm -rf /tmp/* rm -rf /var/cache/yum/* && \
    ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
	mkdir -p $WORK_DIR && \
	cd $WORK_DIR && \
	tar -zxvf /jvx/hostFile/java8.tar.gz -C /jvx/hostFile/ && \
	mv /jvx/hostFile/jdk1.8.0_202 $WORK_DIR/java8 && \
	tar -zxvf /jvx/hostFile/apache-tomcat-9.0.65.tar.gz -C /jvx/hostFile/ && \
	mv /jvx/hostFile/apache-tomcat-9.0.65 $WORK_DIR/tomcat9.0.65
	

# WORKDIR /jvx/hostFile
# COPY ./ .

EXPOSE 8800

# Define default command.
CMD ["/jvx/local/tomcat9.0.65/bin/catalina.sh", "run"]